<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/4/24
  Time: 16:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
</head>
<%--测试地址展示--%>
<body>
<table id="tab">
    <tr>
        <td>地址：</td>
        <td>选择：</td>

    </tr>
</table>
<a href="ceshi.html">新增</a>
<script>
    $(function () {
        $.ajax({
            url:'GetUserAddressByIdServlet',
            type:'POST',
            dataType:'json',
            success:function (data) {
                $.each(data,function (i,n) {
                    var $tr="<tr>"+
                    "<td>"+n.address+"</td>"+"<td>"+
                        "<a href='DeleteUserAddressServlet?adress="+n.address+"'>删除</a>" +
                        "<a href='dhixiugai.jsp?adress="+n.address+"'>修改</a>"
                        +"</tr>";
                    $("#tab").append($tr);
                })

            }
        })
    })
</script>


</body>
</html>
